@extends('layout/admin')

@section('headcss')
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <link rel="stylesheet" href="{{ URL::asset('admin/icheck/minimal/red.css')}}">
@stop

@section('content')
  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
        <fieldset class="layui-elem-field">
            <legend>{{$label}}</legend>
            <div class="layui-field-box">
              <div class="layui-btn-group">
                  <button class="layui-btn layui-btn-sm layui-btn-normal add-dailog" add-url="" >
                      <i class="layui-icon">&#xe654;</i>新增
                  </button>
                  <button class="layui-btn layui-btn-sm layui-refresh">
                      <i class="layui-icon">&#xe9aa;</i>刷新
                  </button>
              </div>
              <hr>
              <table id="usermsg" lay-filter="userlist"></table>

              <script type="text/html" id="barDemo">
                  <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                  <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
              </script>

            </div>
        </fieldset>
    </div>
  </div>

  <div class="layui-container add-form" style="display: none">
    <div class="layui-row">
        <div class="layui-col-lg12">
            <fieldset class="layui-elem-field">
                <legend>{{$label}}</legend>
                <div class="layui-field-box">
                    <form class="layui-form" action="/XserviceAdd">
                         {{ csrf_field() }}
                        <div class="layui-form-item">
                            <label class="layui-form-label">服务备注</label>
                            <div class="layui-input-inline">
                            <input type="text" name="titles" required  lay-verify="required" placeholder="请输入服务备注" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">服务内容</label>
                            <div class="layui-input-block">
                             <textarea name="service_text" required="required" id="textarea0"  placeholder="请输入服务内容" minlength class="layui-textarea"></textarea>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">前台展示</label>
                            <div class="layui-input-block">
                            <input type="checkbox" name="is_show" lay-skin="switch" lay-text="ON|OFF" value="1">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                            <button class="layui-btn " lay-submit lay-filter="formDemo">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </fieldset>
        </div>
    </div>
</div>


  <div class="layui-container update-form" style="display: none">
    <div class="layui-row">
        <div class="layui-col-lg12">
            <fieldset class="layui-elem-field">
                <legend>{{$label}}</legend>
                <div class="layui-field-box">
                    <form class="layui-form" action="/XserviceEdit"  lay-filter="example">
                         {{ csrf_field() }}
                        <input type="hidden" name="id" value="">
                        <div class="layui-form-item">
                            <label class="layui-form-label">服务备注</label>
                            <div class="layui-input-inline">
                            <input type="text" name="titles" required  lay-verify="required" placeholder="请输入服务备注" autocomplete="off" class="layui-input" value = "" lay-verType="tips">
                            </div>

                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">服务内容</label>
                            <div class="layui-input-block">
                             <textarea name="service_text" required="required" id="textarea1"  placeholder="请输入服务内容" minlength class="layui-textarea"></textarea>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                            <button class="layui-btn " lay-submit lay-filter="updateDemo">立即提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
            </fieldset>
        </div>
    </div>
</div>
@stop

@section('js')
  <script type="text/javascript" src="{{ URL::asset('admin/icheck/icheck.js')}}"></script>
  <script type="text/javascript" src="{{ URL::asset('admin/javascript/service.js')}}"></script>
@stop
